3.303 \(\int \frac{\cos ^5(x)}{a+b \sin ^2(x)} \, dx\)

Optimal. Leaf size=54 \[ -\frac{(a+2 b) \sin (x)}{b^2}+\frac{(a+b)^2 \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{5/2}}+\frac{\sin ^3(x)}{3 b} \]

[Out]

((a + b)^2*ArcTan[(Sqrt[b]*Sin[x])/Sqrt[a]])/(Sqrt[a]*b^(5/2)) - ((a + 2*b)*Sin[x])/b^2 + Sin[x]^3/(3*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0732421, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3190, 390, 205} \[ -\frac{(a+2 b) \sin (x)}{b^2}+\frac{(a+b)^2 \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{5/2}}+\frac{\sin ^3(x)}{3 b} \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]^5/(a + b*Sin[x]^2),x]

[Out]

((a + b)^2*ArcTan[(Sqrt[b]*Sin[x])/Sqrt[a]])/(Sqrt[a]*b^(5/2)) - ((a + 2*b)*Sin[x])/b^2 + Sin[x]^3/(3*b)

Rule 3190

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e +
f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cos ^5(x)}{a+b \sin ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^2}{a+b x^2} \, dx,x,\sin (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{a+2 b}{b^2}+\frac{x^2}{b}+\frac{a^2+2 a b+b^2}{b^2 \left (a+b x^2\right )}\right ) \, dx,x,\sin (x)\right )\\ &=-\frac{(a+2 b) \sin (x)}{b^2}+\frac{\sin ^3(x)}{3 b}+\frac{(a+b)^2 \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\sin (x)\right )}{b^2}\\ &=\frac{(a+b)^2 \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{5/2}}-\frac{(a+2 b) \sin (x)}{b^2}+\frac{\sin ^3(x)}{3 b}\\ \end{align*}

Mathematica [A]  time = 0.173709, size = 84, normalized size = 1.56 \[ \frac{6 (a+b)^2 \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )-2 \sqrt{a} \sqrt{b} \sin (x) (6 a+b \cos (2 x)+11 b)-6 (a+b)^2 \tan ^{-1}\left (\frac{\sqrt{a} \csc (x)}{\sqrt{b}}\right )}{12 \sqrt{a} b^{5/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^5/(a + b*Sin[x]^2),x]

[Out]

(-6*(a + b)^2*ArcTan[(Sqrt[a]*Csc[x])/Sqrt[b]] + 6*(a + b)^2*ArcTan[(Sqrt[b]*Sin[x])/Sqrt[a]] - 2*Sqrt[a]*Sqrt
[b]*(6*a + 11*b + b*Cos[2*x])*Sin[x])/(12*Sqrt[a]*b^(5/2))

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 85, normalized size = 1.6 \begin{align*}{\frac{ \left ( \sin \left ( x \right ) \right ) ^{3}}{3\,b}}-{\frac{a\sin \left ( x \right ) }{{b}^{2}}}-2\,{\frac{\sin \left ( x \right ) }{b}}+{\frac{{a}^{2}}{{b}^{2}}\arctan \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+2\,{\frac{a}{\sqrt{ab}b}\arctan \left ({\frac{\sin \left ( x \right ) b}{\sqrt{ab}}} \right ) }+{\arctan \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^5/(a+b*sin(x)^2),x)

[Out]

1/3*sin(x)^3/b-1/b^2*sin(x)*a-2*sin(x)/b+1/b^2/(a*b)^(1/2)*arctan(sin(x)*b/(a*b)^(1/2))*a^2+2/b/(a*b)^(1/2)*ar
ctan(sin(x)*b/(a*b)^(1/2))*a+1/(a*b)^(1/2)*arctan(sin(x)*b/(a*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^5/(a+b*sin(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.30336, size = 393, normalized size = 7.28 \begin{align*} \left [-\frac{3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt{-a b} \log \left (-\frac{b \cos \left (x\right )^{2} + 2 \, \sqrt{-a b} \sin \left (x\right ) + a - b}{b \cos \left (x\right )^{2} - a - b}\right ) + 2 \,{\left (a b^{2} \cos \left (x\right )^{2} + 3 \, a^{2} b + 5 \, a b^{2}\right )} \sin \left (x\right )}{6 \, a b^{3}}, \frac{3 \,{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt{a b} \arctan \left (\frac{\sqrt{a b} \sin \left (x\right )}{a}\right ) -{\left (a b^{2} \cos \left (x\right )^{2} + 3 \, a^{2} b + 5 \, a b^{2}\right )} \sin \left (x\right )}{3 \, a b^{3}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^5/(a+b*sin(x)^2),x, algorithm="fricas")

[Out]

[-1/6*(3*(a^2 + 2*a*b + b^2)*sqrt(-a*b)*log(-(b*cos(x)^2 + 2*sqrt(-a*b)*sin(x) + a - b)/(b*cos(x)^2 - a - b))
+ 2*(a*b^2*cos(x)^2 + 3*a^2*b + 5*a*b^2)*sin(x))/(a*b^3), 1/3*(3*(a^2 + 2*a*b + b^2)*sqrt(a*b)*arctan(sqrt(a*b
)*sin(x)/a) - (a*b^2*cos(x)^2 + 3*a^2*b + 5*a*b^2)*sin(x))/(a*b^3)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**5/(a+b*sin(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.13079, size = 78, normalized size = 1.44 \begin{align*} \frac{{\left (a^{2} + 2 \, a b + b^{2}\right )} \arctan \left (\frac{b \sin \left (x\right )}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{b^{2} \sin \left (x\right )^{3} - 3 \, a b \sin \left (x\right ) - 6 \, b^{2} \sin \left (x\right )}{3 \, b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^5/(a+b*sin(x)^2),x, algorithm="giac")

[Out]

(a^2 + 2*a*b + b^2)*arctan(b*sin(x)/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/3*(b^2*sin(x)^3 - 3*a*b*sin(x) - 6*b^2*sin(
x))/b^3